package com.spark.util;

import java.text.DateFormat;
import java.text.SimpleDateFormat;

@SuppressWarnings("unchecked")
public class DateFormatHelper {

	private static final String DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss";
	private static ThreadLocal threadLocal = new ThreadLocal();
	public static DateFormat getDateFormat() {
		DateFormat df = (DateFormat) threadLocal.get();
		if (df == null) {
			df = new SimpleDateFormat(DATE_FORMAT);
			threadLocal.set(df);
		}
		return df;
	}
}
